<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>成绩</title>
    <link rel="stylesheet" href="../static/bootstrap.css">
    <link rel="stylesheet" href="../static/bootstrap-theme.css">
    <script src="../static/jquery-3.2.1.min.js"></script>
    <script src="../static/bootstrap.js"></script>
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/css/bootstrap.min.css">
</head>
<body>
    <h1 align="center" style="font-family: 仿宋">{{ request.session.t.name }}您好</h1>
    <table class="table table-striped" style="width: 70%;" align="center">
        <tr align="center">
            <td>科目</td>
            <td>学期</td>
            <td>班级</td>
            {% for c in kemu %}
                <td align="center">{{ c.name }}</td>
            {% endfor %}
        </tr>
        {% for chen in contacts %}
            {% for i in li %}
                <tr align="center">
                    {% for c in chen %}
                        {% if c.x_id_id == i %}
                            {% if c.s_id_id == c.s_id.id and c.c_id_id == 1 %}
                                <td>{{ c.s_id.name }}</td>
                                <td><a href="#">{{ c.x_id.xueqi }}</a></td>
                                <td>{{ c.s_id.g_id.classname }}</td>
                            {% endif %}
                            {% if c.s_id_id == c.s_id.id %}
                                <td>{{ c.cheng }}</td>
                            {% endif %}
                        {% endif %}
                    {% endfor %}
                </tr>
            {% endfor %}
        {% endfor %}
    </table>
    <div class="pagination" >
            <span class="step-links">
                {% if contacts.has_previous %}
                    <a href="?page=1">&laquo; 第一页</a>
                    <a href="?page={{ contacts.previous_page_number }}">上一页</a>
                {% endif %}

                <span class="current">
                    页数 {{ contacts.number }} / {{ contacts.paginator.num_pages }}.
                </span>

                {% if contacts.has_next %}
                    <a href="?page={{ contacts.next_page_number }}">下一页</a>
                    <a href="?page={{ contacts.paginator.num_pages }}">最后一页 &raquo;</a>
                {% endif %}
            </span>
        </div>
</body>
</html>